Skip to content

fix: fix undefined error in getTailwindConfig #18665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 3.4
Choose a base branch
from

Conversation

gaultier
Copy link

@gaultier gaultier commented Aug 4, 2025

This fixes this bug:

  ✘ [ERROR] Cannot convert undefined or null to object [plugin postcss]
      
          ../../node_modules/tailwindcss/lib/lib/setupTrackingContext.js:69:33:
            69 │             delete require.cache[file];
               ╵                                  ^
      
          at getTailwindConfig (/Users/philippe.gaultier/company-code/cloud/elements/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:69:34)
          at /Users/philippe.gaultier/company-code/cloud/elements/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:100:92
          at /Users/philippe.gaultier/company-code/cloud/elements/node_modules/tailwindcss/lib/processTailwindFeatures.js:46:11
          at plugins (/Users/philippe.gaultier/company-code/cloud/elements/node_modules/tailwindcss/lib/plugin.js:38:69)
          at LazyResult.runOnRoot (/Users/philippe.gaultier/company-code/cloud/elements/packages/elements-react/node_modules/postcss/lib/lazy-result.js:329:16)
          at LazyResult.runAsync (/Users/philippe.gaultier/company-code/cloud/elements/packages/elements-react/node_modules/postcss/lib/lazy-result.js:258:26)
          at LazyResult.async (/Users/philippe.gaultier/company-code/cloud/elements/packages/elements-react/node_modules/postcss/lib/lazy-result.js:160:30)
          at LazyResult.then (/Users/philippe.gaultier/company-code/cloud/elements/packages/elements-react/node_modules/postcss/lib/lazy-result.js:404:17)

Not sure why we end up in this situation. It typically triggers when everything has been cleaned (rm -rf node_modules && npm ci && npm run build) in my project.

EDIT: On our side we have found out that this issue popped up with node 22.18 and was not present in 22.17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant